The basis of the photochemistry of pharmacodynamic amines has been broadened into oxidative and non-oxidative photocyclizations of 5-membered heterocyclic anilides and of N-alicyclic phthalimides to yield novel heterocyclic systems of potential medicinal interest.